import java.util.Scanner;

/**
   A program reads in a string,
   prints out the last character of the string,
   followed by the first character, and then
   followed by the middle three characters of the string.
   All input strings should be of odd length.
*/
public class StringGames
{
   public static void main (String[] args)
   {
      // Display prompt for input string
      System.out.println("Please enter a string: ");

      // Read string
      Scanner in = new Scanner(System.in);
      String input = in.next();

      int n = input.length();
      int m = (n+1)/2;
      char a=input.charAt(n-1),b=input.charAt(0),c=input.charAt(m-2);
      char d=input.charAt(m-1),e=input.charAt(m);
      System.out.print(""+a+b+c+d+e);
   }
}